const { defineConfig } = require('@vue/cli-service')

const packageName = require('./package.json').name;

module.exports = defineConfig({
  transpileDependencies: true,
  chainWebpack(config){
    config.output.library( `${packageName}-[name]`)
    config.output.libraryTarget('umd')
  // console.log(config.output)
    // config.output.jsonpFunction(`webpackJsonp_${packageName}`)
    config.output.set('chunkLoadingGlobal', `webpackJsonp_${packageName}`)
    // config.output.chunkLoadingGlobal(`webpackJsonp_${packageName}`)
  },
  devServer:{
    host: 'localhost',
    port :8080,
    client:{
      overlay:false
    },
    headers:{
      'Access-Control-Allow-Origin': '*'
    }
    
    // overlay:false
    // overlay: {
    //   warnings: false,
    //   errors: false
    // }

  },
  // publicPath: '/',
  
})
